
import i18n from '@/lang'

// 表头
export const columns = [
  {
    title: i18n.t('campaignName'),
    dataIndex: 'name',
    scopedSlots: { customRender: 'task' },
    width: 400
  },
  {
    title: i18n.t('smartDrivingDomainVersion'),
    dataIndex: 'vehicleVersion',
    scopedSlots: { customRender: 'vehicleVersion' },
    width: 150
  },
  {
    title: i18n.t('modelName'),
    dataIndex: 'modelName',
    width: 140
  },
  {
    title: '任务状态',
    width: 200,
    key: 'status',
    scopedSlots: { customRender: 'status' }
  },
  {
    title: i18n.t('sjcl'),
    width: 200,
    key: 'upgradeVehicle',
    scopedSlots: { customRender: 'upgradeVehicle' }
  },
  {
    title: i18n.t('activationTime'),
    width: 120,
    key: 'startTime',
    scopedSlots: { customRender: 'activationTime' },
    sorter: true
  },
  {
    title: i18n.t('expirationDate'),
    width: 160,
    key: 'expirationDate',
    scopedSlots: { customRender: 'expirationDate' }
  },
  // {
  //   title: i18n.t('operation'),
  //   width: 200,
  //   key: 'operation',
  //   scopedSlots: { customRender: 'operation' }
  // },
  {
    title: '导入车辆批次号',
    width: 200,
    key: 'importBatch',
    scopedSlots: { customRender: 'importBatch' }
  },
  {
    title: '追加车辆状态',
    width: 200,
    key: 'importStatus',
    scopedSlots: { customRender: 'importStatus' }
  },
  {
    title: i18n.t('timeOfCreation'),
    dataIndex: 'createTime',
    key: 'createTime',
    scopedSlots: { customRender: 'createTime' },
    width: 160,
    sorter: true
  },
  {
    title: i18n.t('creator'),
    dataIndex: 'createBy',
    scopedSlots: { customRender: 'createBy' },
    width: 120
  }
]

export const detailTaskExecutiveColumns = [
  {
    title: 'VIN',
    dataIndex: 'vin',
    scopedSlots: { customRender: 'vin' },
    width: 200
  },
  {
      title: i18n.t('taskVehicleAppointTime'),
      dataIndex: 'taskVehicleAppointTimeList',
      scopedSlots: { customRender: 'taskVehicleAppointTimeList' },
      width: 180
  },
  {
      title: '导入车辆批次号',
      dataIndex: 'importBatch',
      scopedSlots: { customRender: 'importBatch' },
      width: 150
  },
  {
    title: i18n.t('resendTimes'),
    dataIndex: 'factoryRetryCount',
    scopedSlots: { customRender: 'factoryRetryCount' },
    width: 120
  },
  {
    title: i18n.t('failedNumber'),
    dataIndex: 'upgradeFailNum',
    scopedSlots: { customRender: 'upgradeFailNum' },
    width: 120
  },
  {
    title: i18n.t('vehicleType'),
    dataIndex: 'vehicleType',
    scopedSlots: { customRender: 'vehicleType' },
    width: 120
  },
  {
    title: i18n.t('startTime'),
    dataIndex: 'startTime',
    sorter: true,
    scopedSlots: { customRender: 'startTime' },
    width: 160
  },
  {
    title: i18n.t('ztgsTime'),
    dataIndex: 'updateTime',
    sorter: true,
    scopedSlots: { customRender: 'updateTime' },
    width: 160
  },
  {
    title: i18n.t('czzt'),
    dataIndex: 'upgradeStatus',
    scopedSlots: { customRender: 'upgradeStatus' },
    width: 124
  },
  {
    title: '升级结果',
    key: 'status',
    scopedSlots: { customRender: 'status' },
    width: 124
  },
  {
    title: i18n.t('vehicleModel'),
    dataIndex: 'modelName',
    scopedSlots: { customRender: 'vehicleModel' },
    width: 120
  },
  {
    title: i18n.t('stereotype'),
    dataIndex: 'trimLevel',
    scopedSlots: { customRender: 'stereotype' },
    width: 120
  },
  {
    title: i18n.t('operation'),
    width: 100,
    fixed: 'right',
    scopedSlots: { customRender: 'action' }
  }
]

export const viewChoseCarListColumns = [
  {
    title: 'VIN',
    dataIndex: 'vin',
    width: 120,
    scopedSlots: { customRender: 'VIN' }
  },
  {
    title: i18n.t('vehicleType'),
    dataIndex: 'vehicleType',
    special: true,
    width: 120,
    scopedSlots: { customRender: 'vehicleType' }
  },
  {
    title: i18n.t('modelCode'),
    dataIndex: 'modelCode',
    width: 120,
    scopedSlots: { customRender: 'modelCode' }
  },
  {
    title: i18n.t('modelName'),
    dataIndex: 'modelName',
    width: 120,
    scopedSlots: { customRender: 'modelName' }
  },
  {
    title: i18n.t('stereotype'),
    dataIndex: 'trimLevel',
    width: 120,
    scopedSlots: { customRender: 'trimLevel' }
  },
  {
    title: i18n.t('latestOnlineTime'),
    dataIndex: 'lastActiveTime',
    width: 180,
    sorter: true,
    special: true,
    scopedSlots: { customRender: 'lastActiveTime' }
  },
  {
    title: i18n.t('province'),
    dataIndex: 'province',
    width: 120,
    special: true,
    scopedSlots: { customRender: 'province' }
  }
]
